3.4 \(\int \tan ^4(c+d x) \, dx\)

Optimal. Leaf size=28 \[ \frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}+x \]

[Out]

x-tan(d*x+c)/d+1/3*tan(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3473, 8} \[ \frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}+x \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4,x]

[Out]

x - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \tan ^4(c+d x) \, dx &=\frac {\tan ^3(c+d x)}{3 d}-\int \tan ^2(c+d x) \, dx\\ &=-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}+\int 1 \, dx\\ &=x-\frac {\tan (c+d x)}{d}+\frac {\tan ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 38, normalized size = 1.36 \[ \frac {\tan ^{-1}(\tan (c+d x))}{d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^4,x]

[Out]

ArcTan[Tan[c + d*x]]/d - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d)

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 26, normalized size = 0.93 \[ \frac {\tan \left (d x + c\right )^{3} + 3 \, d x - 3 \, \tan \left (d x + c\right )}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="fricas")

[Out]

1/3*(tan(d*x + c)^3 + 3*d*x - 3*tan(d*x + c))/d

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check si
gn: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)(12*d*x*tan(c)^3*t
an(d*x)^3-36*d*x*tan(c)^2*tan(d*x)^2+36*d*x*tan(c)*tan(d*x)-12*d*x-3*pi*sign(2*tan(c)^2*tan(d*x)+2*tan(c)*tan(
d*x)^2-2*tan(c)-2*tan(d*x))*tan(c)^3*tan(d*x)^3+9*pi*sign(2*tan(c)^2*tan(d*x)+2*tan(c)*tan(d*x)^2-2*tan(c)-2*t
an(d*x))*tan(c)^2*tan(d*x)^2-9*pi*sign(2*tan(c)^2*tan(d*x)+2*tan(c)*tan(d*x)^2-2*tan(c)-2*tan(d*x))*tan(c)*tan
(d*x)+3*pi*sign(2*tan(c)^2*tan(d*x)+2*tan(c)*tan(d*x)^2-2*tan(c)-2*tan(d*x))-3*pi*tan(c)^3*tan(d*x)^3+9*pi*tan
(c)^2*tan(d*x)^2-9*pi*tan(c)*tan(d*x)+3*pi+6*atan((tan(c)*tan(d*x)-1)/(tan(c)+tan(d*x)))*tan(c)^3*tan(d*x)^3-1
8*atan((tan(c)*tan(d*x)-1)/(tan(c)+tan(d*x)))*tan(c)^2*tan(d*x)^2+18*atan((tan(c)*tan(d*x)-1)/(tan(c)+tan(d*x)
))*tan(c)*tan(d*x)-6*atan((tan(c)*tan(d*x)-1)/(tan(c)+tan(d*x)))+6*atan((tan(c)+tan(d*x))/(tan(c)*tan(d*x)-1))
*tan(c)^3*tan(d*x)^3-18*atan((tan(c)+tan(d*x))/(tan(c)*tan(d*x)-1))*tan(c)^2*tan(d*x)^2+18*atan((tan(c)+tan(d*
x))/(tan(c)*tan(d*x)-1))*tan(c)*tan(d*x)-6*atan((tan(c)+tan(d*x))/(tan(c)*tan(d*x)-1))+12*tan(c)^3*tan(d*x)^2-
4*tan(c)^3+12*tan(c)^2*tan(d*x)^3-36*tan(c)^2*tan(d*x)-36*tan(c)*tan(d*x)^2+12*tan(c)-4*tan(d*x)^3+12*tan(d*x)
)/(12*d*tan(c)^3*tan(d*x)^3-36*d*tan(c)^2*tan(d*x)^2+36*d*tan(c)*tan(d*x)-12*d)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 35, normalized size = 1.25 \[ \frac {\tan ^{3}\left (d x +c \right )}{3 d}-\frac {\tan \left (d x +c \right )}{d}+\frac {d x +c}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4,x)

[Out]

1/3*tan(d*x+c)^3/d-tan(d*x+c)/d+1/d*(d*x+c)

________________________________________________________________________________________

maxima [A]  time = 0.72, size = 29, normalized size = 1.04 \[ \frac {\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="maxima")

[Out]

1/3*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 2.50, size = 24, normalized size = 0.86 \[ x-\frac {\mathrm {tan}\left (c+d\,x\right )-\frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^4,x)

[Out]

x - (tan(c + d*x) - tan(c + d*x)^3/3)/d

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 27, normalized size = 0.96 \[ \begin {cases} x + \frac {\tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {\tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \tan ^{4}{\relax (c )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4,x)

[Out]

Piecewise((x + tan(c + d*x)**3/(3*d) - tan(c + d*x)/d, Ne(d, 0)), (x*tan(c)**4, True))

________________________________________________________________________________________